/* PATH.H */

/*
	Copyright (C) 2010 by Lesnikov Andrey <ozkriff@gmail.com>
	This file is part of ozkriff_game_2.

	ozkriff_game_2 is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	ozkriff_game_2 is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with ozkriff_game_2.  If not, see <http://www.gnu.org/licenses/>.

	See the COPYING file for more details.
*/

typedef struct Q {
	long int tail;
	long int head;
	ushort *qx;
	ushort *qy;
	long int qu_size;
} Q;


void	push (ushort x, ushort y, ushort px, ushort py, uint NEW);
uint	process_ZOC (uint cost, ushort x, ushort y, unit *u);
void	try_push (unit *u, ushort x, ushort y, ushort px, ushort py);
bool	pop (ushort *x, ushort *y);
bool	init_q ();
void	fill_map (unit *u);
void	get_path (unit *u, ushort ex, ushort ey);

